/**
 * 频道请求模块
 */
import request from '../utils/request.js'

export const getAllChannels = () => {
  return request({
    method: 'GET',
    url: '/app/v1_0/channels'
  })
}

/**
 * 添加频道列表
 * @channel {id:'',seq}
 */
export const addUserChannels = (channel) => {
  return request({
    method: 'PATCH',
    url: '/app/v1_0/user/channels',
    data: {
      channels: [channel]
    }
  })
}
/**
 * 删除频道
 * @param {*} id 删除的频道id
 */
export const deleteUserChannels = id => {
  return request({
    method: 'DELETE',
    url: `/app/v1_0/user/channels/${id}`
  })
}
